package com.yanqingshan.platform.module.sys.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yanqingshan.platform.module.sys.model.domain.SysUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 功能描述: 系统用户 Mapper接口
 *
 * @author yanqs
 * @since 2023-05-12
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    @Select("<script>" +
            "SELECT role_id FROM sys_user_role WHERE status = 0 and user_id = ${userId}" +
            "</script>")
    List<Long> queryRoleIdsByUserId(@Param("userId")Long userId);
}
